<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var year=prompt("请输入你的出生年份");
			var age=2022-year;
			alert('你今年'+age+'岁了');
		</script>
	</head>
	<body>
	</body>
</html>
